const Router = require('koa-router')

const bannerController = require('../../controllers/banner')

const m = require('../../middlewares/admin_auth')

const router = new Router({ prefix: '/admin/api/v1/banner' })


router.get('/getlist',bannerController.list);
router.get('/getList', m.auth,bannerController.list);

router.post('/create', m.auth,bannerController.create)


router.get('/detail/:id',m.auth, bannerController.detail)


router.delete('/:id', m.auth, bannerController.delete)


router.patch('/:id', m.auth, bannerController.update)

router.get('/getBannerBelongMap',bannerController.getBannerBelongMap);

router.get('/getBannerBelongList',bannerController.getBannerBelongList);

router.get('/getBannerOpenTypeMap',bannerController.getBannerOpenTypeMap);

router.get('/getBannerOpenTypeList',bannerController.getBannerOpenTypeList);


module.exports = router
